package com.sytc.camera.util;

public enum RUN_STATE {
    RUNNING(0),
    STOPPED (1),
    PAUSED(2);

    private final int value;

    RUN_STATE(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    // 根据整数值获取枚举
    public static RUN_STATE fromInt(int i) {
        for (RUN_STATE type : RUN_STATE.values()) {
            if (type.getValue() == i) {
                return type;
            }
        }
        return null;  // 如果没有匹配的，返回 null
    }
}
